#pragma once

#include "stdafx.h"

namespace natrium {
	namespace input {
		class Mouse {
		public:
			int mX;
			int mY;

			enum eMouseButton {
				LEFT_BUTTON = 0,
				MIDDLE_BUTTON,
				RIGHT_BUTTON
			};

			bool mButtonPressed[3];
			int mWheel;

			Mouse();
			virtual ~Mouse();

			static void glfwMousePosCallback(int x, int y);
			static void glfwMouseButtonCallback(int button, int state);
			static void glfwMouseWheelCallback(int value);

			struct MouseMoved {
				int mX;
				int mY;

				MouseMoved(int x, int y);
			};

			struct MouseLeftButtonPressed {};
			struct MouseMiddleButtonPressed {};
			struct MouseRightButtonPressed {};

			struct MouseLeftButtonReleased {};
			struct MouseMiddleButtonReleased {};
			struct MouseRightButtonReleased {};

			struct MouseWheel {
				int mValue;

				MouseWheel(int value);
			};

			void operator()(const MouseMoved& );

			void operator()(const MouseLeftButtonPressed& );
			void operator()(const MouseMiddleButtonPressed& );
			void operator()(const MouseRightButtonPressed& );

			void operator()(const MouseLeftButtonReleased& );
			void operator()(const MouseMiddleButtonReleased& );
			void operator()(const MouseRightButtonReleased& );

			void operator()(const MouseWheel& mw);
		};
	}
}